﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BlogAppExt.Models
{
    /// <summary>
    /// Creates a trimmed down object to display list of blog posts to user
    /// </summary>
    public class PostPreview
    {
        public int PostId { get; set; }
        public int UserId { get; set; }
        public string UserName { get; set; }
        public string Image { get; set; }

        public string Title { get; set; }
        public string Text { get; set; }

        /// <summary>
        /// Creates a trimmed down object to display list of blog posts to user
        /// </summary>
        /// <param name="postId">The Id of the post so it can be linked back to</param>
        /// <param name="userId">The user Id of the poster</param>
        /// <param name="userName">The poster's user name</param>
        /// <param name="image">The poster's image URL</param>
        /// <param name="title">The title of the post</param>
        /// <param name="text">The shortened text of the post to show a preview</param>
        public PostPreview(int postId, int userId, string userName, string image, string title, string text)
        {
            PostId = postId;
            UserId = userId;
            UserName = userName;
            Title = title;
            Text = text;
            Image = image;
        }
    }
}